package cn.njxzc.demo.bam;

public class Test {
	public static void main(String[] args) {
		/*
		Bank bank = new Bank();
		Scanner scan = new Scanner(System.in);
		boolean quit = false;
		Account account = null;
		String regex = "^[0-9]+$";
		Pattern pattern = Pattern.compile(regex);
		String order;
		/*
		do {
			System.out.println("Please input account id:('q' or 'Q' to quit)");
			long id = scan.nextLong();
			if(!Pattern.matches(regex, Long.toString(id))){
				//System.out.println("Wrong input! Please input a number.\n");
				if("q".equals(Long.toString(id)) || "Q".equals(Long.toString(id))){
					quit = true;
					continue;
				}
				System.out.println("Wrong input!\n");
			}else{
				System.out.println("Please input password:");
				String password = scan.next();
				account = bank.login(id, password);
				
				if(account != null){
					
				}
			}
		} while (!quit);
		
		do {
			System.out.println("Input a number to select a service:('q' or 'Q' to quit)");
			order = scan.next();
			if("q".equals(order) || "Q".equals(order)){
				account = null;
				continue;
			}
			if(!Pattern.matches(regex, order)){
				System.out.println("Wrong input! Please input a number.\n");
				continue;
			}
		} while (account != null);
		*/
		//String moneyRegex = "^[0-9]+\\.?[0-9]+$";
		Bank bank = new Bank();
		bank.init();
		bank.startService();
	}
}
